package com.android.questions.ui.activity;

import android.app.Activity;
import android.content.Intent;
import android.view.View;

import androidx.viewbinding.ViewBinding;

import com.android.base.ui.base.VBBaseActivity;
import com.android.base.util.DisplayUtil;
import com.android.base.util.SystemUtil;
import com.android.questions.R;
import com.android.questions.config.AppDataSourse;
import com.android.questions.databinding.ActivityHelpBinding;
import com.android.questions.ui.adapter.HelpAdapter;

/**
 * FileName: HelpActivity
 * Author: admin
 * Date: 2021/11/4 16:55
 * Description:
 */
public class HelpActivity extends VBBaseActivity implements View.OnClickListener {

    private ActivityHelpBinding helpBinding;

    public static void startActivity(Activity activity) {
        Intent intent = new Intent(activity, HelpActivity.class);
        activity.startActivity(intent);
    }

    @Override
    protected ViewBinding getViewBinding() {
        setTitleBackground(BG_WHITE);
        return helpBinding = ActivityHelpBinding.inflate(getLayoutInflater());
    }

    @Override
    public void initView() {
        super.initView();
        helpBinding.tvTitle.setText("帮助中心");

        HelpAdapter helpAdapter = new HelpAdapter();
        helpBinding.recyclerView.setAdapter(helpAdapter);
        helpAdapter.setList(AppDataSourse.getHelpData());
    }

    @Override
    public void initLister() {
        super.initLister();
        helpBinding.imgBack.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        if (v.getId() == R.id.imgBack) {
            finish();
        }
    }
}
